﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin.Master" AutoEventWireup="true" CodeBehind="ActionList.aspx.cs" Inherits="yedian.ActionList" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">

        function del(id, actionName) {
            if (confirm("确定要删除" + actionName + "？")) {
                $.ajax({
                    type: "POST",
                    url: "Handler.r",
                    dataType: "json",
                    async: false,
                    data: {
                        typename: "delaction",
                        Id: id
                    },
                    success: function (msg) {
                        if (msg.success == "true") {
                            ShowDialogInfoG("删除成功", window.location.href);
                        }
                        else {
                            ShowDialog(msg.msg);
                            _pass = false;
                        }
                    },
                    error: function (XMLHttpRequest, textStatus, errorThrown) {
                    }
                });
            }
        }
    </script>
    <div style="height:100%">

        <asp:HiddenField id="sid" runat="server" value="0" />
        <div id="breadcrumb">
            <a href="#" title="Go to Home" class="tip-bottom"><i class="icon-home"></i>Home</a>
            <a href="ShopList.aspx" class="current">活动管理</a></div>
         <table width="88%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td class="STYLE6" align="left" style="width: 350px; height: 45px;">
                &nbsp;活动名称：<asp:TextBox ID="actionName" Width="180px" runat="server"></asp:TextBox>
            </td>
            <td class="STYLE6" align="left" style="width: 350px; height: 45px;">
                &nbsp;活动类型：<select id="actionstatus" runat="server" style="width: 100px;">
                    <option value="">全部</option>
                <option value="0">商家活动</option>
                <option value="1">平台活动</option>
            </select>
            </td>
            <td align="left"> <asp:Button
                    ID="Button1" runat="server" class="btn btn-success" Text="查询" OnClick="Button1_Click" /> &nbsp; &nbsp;<input name="" onclick="window.location.href = 'ActionAdd.aspx'" type="button" class="btn" value="添加活动"
                        />
            </td>
        </tr>
    </table>

    <table rules="cols" class="table" width="100%" border="0" cellpadding="0" cellspacing="1">
        <asp:Repeater ID="rptlist" runat="server" EnableViewState="false">
            <HeaderTemplate>
                <tr style=" height: 25px;" class="STYLE5">
                    <td style=" width:140px;">名称
                    </td>
                     <td style=" width:100px;">活动类型
                    </td>
                    <td style=" width:120px;">地点
                    </td>
                    <td style=" width:120px;">开始时间
                    </td>
                    <td style=" width:120px;">创建时间
                    </td>
                    <td>操作</td>
                </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr class="tdwwbackground STYLE5">
                    <td style="height: 32px;"><%# Eval("actionName")%></td>
                    <td style="height: 32px; word-wrap: break-word;word-break: normal;"><%# Eval("actionType").ToString()=="0"?"商家活动":"平台活动"%></td>
                    <td style="height: 32px; word-wrap: break-word;word-break: normal;"><%# Eval("actionAddress")%></td>
                    <td style="height: 32px; word-wrap: break-word;word-break: normal;"><%# Eval("startTime")%></td>
                    <td style="height: 32px; word-wrap: break-word;word-break: normal;"><%# Eval("createTime")%></td>
                    <td style="height: 32px;"><a href="ActionEdit.aspx?Id=<%# Eval("hdId")%>">编辑</a>&nbsp;&nbsp;|&nbsp;&nbsp;<%# sfrzs(Eval("isDel").ToString(),Eval("hdId").ToString(),Eval("actionName").ToString())%></td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
    </table>
           <Yd:PageButton ID="PageBtn" runat="server" />

    </div>
     <div id="Div5" title=" 卡座介绍 " style="text-align: left">
        <table width="100%" height="90%" border="0" cellpadding="0" cellspacing="1" bgcolor="#b5d6e6"
            align="center">
            <tr >
                <td class="STYLE2" style="padding: 3px;">
                    <span id="dd"></span>
                </td>
            </tr>
         
        </table>
    </div>
</asp:Content>